import http from "../../utils/http";
enum API {
  //默认关键字列表
  keywordList = "/search/init.json",
  //实时关键字提示
  currentTimekeyword = "search/searchAutoComplete.json",
  //search
  search='/search/search.json?__timestamp=1630133434953&needPopWindow=true&searchWordSource=7&stillSearch=false&_stat_search=autoComplete&itemId=0&size=40&upperPrice=-1&floorPrice=-1&matchType=0&categoryId=0&descSorted=false&sortType=0&keyword='
}
//默认关键字列表
export const reqKeywordList = () => http.get(API.keywordList);
//实时关键字提示
export const reqCurrentTimekeyword = (keywordPrefix: string) =>
  http.post(
    API.currentTimekeyword,
    { keywordPrefix },
    {
      headers: {
        "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
      },
    }
  );
export const reqSearchList=(keyword:string)=>http.get(API.search+keyword);
